<template>
    <div id="async">
        async
    </div>
</template>
<script>
    export default {
        name: "async",
        components: {},
        data() {
            return {};
        },
        methods: {
            asyncFunctuin: function () {
                console.log('下面的逻辑是异步的');
                setTimeout(() => {
                    console.log('延时后执行');
                }, 1000);
            }
        },
        mounted() {
            console.log('组建挂载');
            const that = this
            async function beginFunction(){
                console.log('1111111111111111111111111');
                await that.asyncFunctuin();
                console.log('计数完成');
            }
            beginFunction()
        },
    };
</script>
<style scoped>

</style>